import ajax from "./ajax";

/**
 * 获取积分兑换申请列表
 */
export function getCreditApplyList(searchObj) {
  return ajax.get("/api/credit/apply/exchanges", { params: searchObj });
}

/**
 * (业务员/客户)积分详情查询
 */
export function getCreditDetail() {
  return ajax.get("/api/credit/summary");
}

export function handleCreditApply(updateObj) {
  let url = `/api/credit/apply/exchange/${updateObj.applyId}`;
  return ajax.put(url, { remark: updateObj.remark, status: updateObj.status });
}
